import request from "@/request";

export default {

  getGoodsList(query) {
    return request({
      url: "/info/goods/list",
      method: "get",
      params: query,
    });
  },

  getCustomerGoodsList(query) {
    return request({
      url: "/customer/goods/list",
      method: "get",
      params: query,
    });
  },


  getGoodsDetail(id) {
    return request({
      url: `/info/goods/${id}`,
      method: "get",
    });
  },

  createGoods(data) {
    return request({
      url: "/info/goods",
      method: "post",
      data,
    });
  },
  updateGoods(data) {
    return request({
      url: "/info/goods",
      method: "put",
      data,
    });
  },
  toggleGoods(data) {
    return request({
      url: "/info/goods/updateStatus",
      method: "put",
      data,
    });
  },

};
